require 'test/unit'
def __DIR__(*args) File.join(File.dirname(__FILE__), *args)
end

ENV['RAILS_ENV']='test'
require __DIR__('../../../../config/environment')
if File.exists? __DIR__('../../../rails')
  $:.unshift __DIR__('../../../rails/activesupport/lib')
  $:.unshift __DIR__('../../../rails/actionpack/lib')
  $:.unshift __DIR__('../../../rails/activerecord/lib')
  $:.unshift __DIR__('../../../rails/actioncontroller/lib')
else
  require 'rubygems'
end


require 'active_support'
require 'active_record'
require 'active_record/fixtures'
require 'action_pack'
require 'action_controller'
require 'action_controller/test_process'

load __DIR__('schema.rb')

Test::Unit::TestCase.fixture_path = __DIR__('fixtures')
$:.unshift Test::Unit::TestCase.fixture_path
Test::Unit::TestCase.use_instantiated_fixtures = false

ActionController::Base.ignore_missing_templates=true
ActionController::Routing::Routes.reload rescue nil
class ActionController::Base; def rescue_action(e) raise e end; end


logger = Logger.new __DIR__("debug.log")
ActiveRecord::Base.logger = logger

$:.unshift __DIR__('../lib') if File.directory? __DIR__('../lib')
load __DIR__('../init.rb') if File.exists? __DIR__('../init.rb')

load __DIR__('user_controller.rb')
